package com.rocpenghua.design.mediator;

/**
 * @author pengp
 * @date 2023年02月24日 15:16
 */
public class Buyer extends Colleague {

    public Buyer(String name) {
        super(name);
    }

    @Override
    public void Send(String to, String ad) {
        mediator.relay(name, to, ad);
    }

    @Override
    public void receive(String from, String ad) {
        System.out.println(name + "接收到来自" + from + "的消息:" + ad);
    }

}
